package com.woniu40.petai_manager.mapper;

import com.woniu40.petai_manager.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    User selectByPrimaryKey(Integer userId);

    List<User> selectAll(String name);

    int updateByPrimaryKey(User record);

    User selectUserByName(String userName);

    @Select("select user_status from t_user where user_id=#{userid}")
   int selectStatusByUserId(Integer userid);

    int update(@Param("userid") Integer userid,@Param("userStatus") Integer userStatus);
}